package com.atguigu.eud_teacher.controller.front;

import com.atguigu.commonutils.R;
import com.atguigu.eud_teacher.service.CourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: Administrator
 * @date: 2021-04-10 20:35
 */
@RestController
@RequestMapping("/vue-admin-template/hotInfos")
@CrossOrigin
@Api(tags = "--前台幻灯篇管理接口API")
public class IndexFrontController {

    @Autowired
    private CourseService courseService;

    @ApiOperation(value="获取热门课程和讲师信息")
    @GetMapping("/getAllHotSubjects")
    public R getAllHotSubjects(){
        Map<String,Object> map=courseService.selectIndexByHotSubjects();
        return R.ok().data(map);
    }
}
